<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- 设置可触摸设备的禁止缩放; -->
<meta name="viewport"
	content="width=device-width, 
                                     initial-scale=1.0, 
                                     maximum-scale=1.0, 
                                     user-scalable=no">
<title>HOME</title>

<link href="http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">


<script src="../jslib/respond.min.js"></script>

<!-- css樣式 -->
<style type="text/css">
body {
	margin: 0px;
	padding: 0px;
}
</style>


</head>
<body>

	<!-- 导航栏 -->
	<div
		style="width: 100%; background: #fcfcfc; height: 70px; border-bottom: 1px solid #ccc;"></div>

	<!-- 登陆区域 -->
	
		<!-- <input type="file" id="file" name="file" value="上传头像">
		<button onclick="startOnload()">传</button> -->
		<div class="container-fluid">
		  <div class="row">
		    <div class="col-md-4 col-md-offset-4 col-xs-8 col-xs-offset-2" style="text-align:center;">
		    	<form class="navbar-form navbar-left" role="search">
				  <div class="form-group">
				    <input type="text" class="form-control" id="username" placeholder="username">
				  </div>
				  <button onclick="login();return false;" class="btn btn-success">登录</button>
				</form>
		    </div>
		  </div>
		</div>
	
	
	

	<!-- 底部 -->
	<div
		style="border-top: 1px solid #ccc; width: 100%; height: 60px; background: #fcfcfc; position: fixed; bottom: 0px; text-align: center;">
		<p style="font-family: '' 黑体;">&copy;flyschat</p>
	</div>
	
</body>
<script type="text/javascript" src="/WebSocket_01/jslib/jquery-1.4.3.js"></script>
<script type="text/javascript"
	src="/WebSocket_01/jslib/ajaxfileupload.js"></script>
<script type="text/javascript" src="js/isPC.js"></script>
<script type="text/javascript">
	function login() {
		var user = document.getElementById("username");
		if(IsPC()){
			location.href = "NewFile.html?username=" + user.value;
			
		}else{
			location.href = "/WebSocket_01/mobile/mobileChat.html?username=" + user.value;
		}
		
	}
	
	onload=function(){
		
	}

	function startOnload() {
		/* $("#wait_loading").ajaxStart(function() {
			$(this).show();
			// 文件上传完成将图片隐藏起来
		}).ajaxComplete(function() {
			$(this).hide();
		}); */
		$.ajaxFileUpload({
			url: "/WebSocket_01/file/expression.do",
			type: "POST",
			secureuri: false,
			fileElementId: 'file',
			dataType:"text",
			elementIds:'ajax文件上传',
			success:function(data, status) {

				alert("请刷新页面查看文件");

			}
		});
	}
</script>
</html>